package com.spi.controller;

import com.spi.AnimalManagerLoader;
import com.spi.AnimalSay;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author God.Jhon.Black
 * @date 2023-01-11
 */
@RestController
public class TestController {

    @RequestMapping("/")
    public void test() {
        AnimalManagerLoader animalManagerLoader = AnimalManagerLoader.getInstance();
        List<AnimalSay> animalSays = animalManagerLoader.getAnimalSays();
        for (AnimalSay animalSay : animalSays) {
            animalSay.say();
        }
    }
}
